package com.pvdnc.outguess;

import android.net.Uri;

import java.io.File;
import java.io.InputStream;

public abstract class FileCallback {
    private String mMime;

    public static final String MIME_ANY="*/*";

    public static final String MIME_ZIP="application/x-zip-compressed";

    public boolean checkMime(String mime){
        if(mime.equals(MIME_ANY)
        ||mMime.equals(MIME_ANY))
            return true;
        return mMime.equals(mime);
    }

    public FileCallback(String mime){
        mMime=mime;
    }

    public abstract void onFileReceived(Uri uri,
                                        InputStream is/*don't close stream in callback*/);
}
